package com.hsc.yalebao.zhuanpan;

import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.flyco.animation.BaseAnimatorSet;
import com.flyco.animation.BounceEnter.BounceEnter;
import com.flyco.animation.ZoomExit.ZoomOutTopExit;
import com.flyco.dialog.widget.base.BaseDialog;
import com.google.gson.Gson;
import com.hsc.yalebao.base.ActivityStack;
import com.hsc.yalebao.base.BaseActivity;
import com.hsc.yalebao.base.CustomApplication;
import com.hsc.yalebao.base.MainActivity;
import com.hsc.yalebao.http.AppConstants;
import com.hsc.yalebao.http.RequestNet;
import com.hsc.yalebao.model.BaseDataObject;
import com.hsc.yalebao.model.GiftCallBack;
import com.hsc.yalebao.model.GiftContentModel;
import com.hsc.yalebao.model.GiftModel;
import com.hsc.yalebao.model.GiftMoreModel;
import com.hsc.yalebao.model.GiftRuleContentModel;
import com.hsc.yalebao.model.UserBaseBean;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.weight.LogUtils;
import com.zhy.http.okhttp.callback.StringCallback;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import okhttp3.Call;

public class ZhuanPanActivity extends BaseActivity
  implements LunPanListener
{
  private Animation anim;
  private BaseAnimatorSet bas_in;
  private BaseAnimatorSet bas_out;
  private PicDialog dialog;
  int i;
  private ImageView iv_title_left;
  private ImageView iv_title_right;
  private int mCount;
  private List<GiftModel> mDataList;
  private String mDes;
  private int mDu;
  private String mGiftId;
  private GiftModel mGiftModel;
  private Handler mHandler;
  private boolean mIsUse;
  private int mLevel;
  private int[] mLevel1 = { 1, 3, 6, 8, 11 };
  private int[] mLevel2;
  private int[] mLevel3;
  private int[] mLevel4;
  private int[] mLevel5;
  private ImageView mLunPanView;
  private ImageView mRightTv;
  private String mRule;
  private TextView mRuleTv;
  private ImageView mStartBut;
  private TextView mTishiTextView;
  private ImageView mTopImageView;
  private RelativeLayout mYuanPanLayout;
  private MediaPlayer mediaPlayer;
  View.OnClickListener onClickListener;

  public ZhuanPanActivity()
  {
    int[] arrayOfInt = new int[3];
    arrayOfInt[1] = 5;
    arrayOfInt[2] = 9;
    this.mLevel2 = arrayOfInt;
    this.mLevel3 = new int[] { 2, 10 };
    this.mLevel4 = new int[] { 7 };
    this.mLevel5 = new int[] { 4 };
    this.mDu = 30;
    this.mCount = 12;
    this.i = 1;
    this.onClickListener = new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        switch (paramAnonymousView.getId())
        {
        default:
          return;
        case 2131099699:
          CustomApplication.app.finishActivity(ZhuanPanActivity.this);
          return;
        case 2131100017:
        }
        Intent localIntent = new Intent(ZhuanPanActivity.this, PrizeHistoryActivity.class);
        ZhuanPanActivity.this.startActivity(localIntent);
      }
    };
    this.mHandler = new Handler();
    this.mediaPlayer = null;
    this.mDataList = new ArrayList();
    this.mGiftId = "";
    this.mLevel = -1;
    this.mRule = "";
    this.mDes = "恭喜发财";
    this.mIsUse = true;
  }

  private void getGift()
  {
    if (CustomApplication.app.userBaseBean == null)
      return;
    showLoadingDialog();
    HashMap localHashMap = new HashMap();
    localHashMap.put("memberid", CustomApplication.app.userBaseBean.getMemberid());
    LogUtils.d("zhaugnpan", "URL:" + AppConstants.URL_GETGIFT);
    RequestNet.get(this, AppConstants.URL_GETGIFT, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("zhaugnpan", "获取失败,GetGiftCount-result:" + paramAnonymousException);
        ZhuanPanActivity.this.dismissLoadingDialog();
      }

      public void onResponse(String paramAnonymousString)
      {
        ZhuanPanActivity.this.dismissLoadingDialog();
        LogUtils.d("zhaugnpan", "-------GetGiftCount:" + paramAnonymousString);
        Gson localGson = new Gson();
        try
        {
          localGiftMoreModel = (GiftMoreModel)localGson.fromJson(paramAnonymousString, GiftMoreModel.class);
          if (localGiftMoreModel == null)
            return;
        }
        catch (Exception localException)
        {
          GiftMoreModel localGiftMoreModel;
          do
          {
            do
            {
              while (true)
              {
                localException.printStackTrace();
                localGiftMoreModel = null;
              }
              if (localGiftMoreModel.getFlag() == -4)
              {
                ZhuanPanActivity.activityStack.backToMain(MainActivity.class, ZhuanPanActivity.this);
                return;
              }
            }
            while (localGiftMoreModel.getFlag() == 0);
            if (localGiftMoreModel.getFlag() == -2)
            {
              ZhuanPanActivity.this.showDownWireDialog();
              return;
            }
            if (localGiftMoreModel.getFlag() == -3)
            {
              ZhuanPanActivity.this.ShowFengjinDialog();
              return;
            }
          }
          while (localGiftMoreModel.getFlag() != 1);
          ZhuanPanActivity.this.mDataList = localGiftMoreModel.getGifts();
          if ((ZhuanPanActivity.this.mDataList != null) && (ZhuanPanActivity.this.mDataList.size() > 0))
          {
            if (((GiftModel)ZhuanPanActivity.this.mDataList.get(0)).getType() == 2)
            {
              ZhuanPanActivity.this.mStartBut.setEnabled(false);
              ZhuanPanActivity.this.getLevel();
              ZhuanPanActivity.this.NormalDialogStyleTwo();
              return;
            }
            ZhuanPanActivity.this.mStartBut.setEnabled(true);
            return;
          }
          ZhuanPanActivity.this.mStartBut.setEnabled(false);
        }
      }
    });
  }

  private void getGiftContent()
  {
    showLoadingDialog();
    HashMap localHashMap = new HashMap();
    localHashMap.put("rule_type", "1,2");
    LogUtils.d("zhaugnpan", "getGiftContent:" + AppConstants.URL_GETRULECONTENT);
    RequestNet.get(this, AppConstants.URL_GETRULECONTENT, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("zhaugnpan", "获取失败,getGiftContent-result:" + paramAnonymousException);
        ZhuanPanActivity.this.dismissLoadingDialog();
        ZhuanPanActivity.this.getGift();
      }

      public void onResponse(String paramAnonymousString)
      {
        ZhuanPanActivity.this.dismissLoadingDialog();
        ZhuanPanActivity.this.getGift();
        LogUtils.d("zhaugnpan", "-------getGiftContent:" + paramAnonymousString);
        Gson localGson = new Gson();
        List localList;
        int i;
        try
        {
          localGiftRuleContentModel = (GiftRuleContentModel)localGson.fromJson(paramAnonymousString, GiftRuleContentModel.class);
          if (localGiftRuleContentModel == null)
            return;
        }
        catch (Exception localException)
        {
          do
          {
            GiftRuleContentModel localGiftRuleContentModel;
            do
            {
              do
              {
                while (true)
                {
                  localException.printStackTrace();
                  localGiftRuleContentModel = null;
                }
                if (localGiftRuleContentModel.getFlag() == -4)
                {
                  ZhuanPanActivity.activityStack.backToMain(MainActivity.class, ZhuanPanActivity.this);
                  return;
                }
              }
              while (localGiftRuleContentModel.getFlag() == 0);
              if (localGiftRuleContentModel.getFlag() == -2)
              {
                ZhuanPanActivity.this.showDownWireDialog();
                return;
              }
              if (localGiftRuleContentModel.getFlag() == -3)
              {
                ZhuanPanActivity.this.ShowFengjinDialog();
                return;
              }
            }
            while (localGiftRuleContentModel.getFlag() != 1);
            localList = localGiftRuleContentModel.getDatas();
          }
          while (localList == null);
          i = 0;
        }
        label163: GiftContentModel localGiftContentModel;
        String str;
        if (i < localList.size())
        {
          localGiftContentModel = (GiftContentModel)localList.get(i);
          str = localGiftContentModel.getType();
          if (!str.equals("1"))
            break label264;
          ZhuanPanActivity.this.mRule = localGiftContentModel.getContent();
          ZhuanPanActivity.this.mRuleTv.setText(ZhuanPanActivity.this.mRule);
          ZhuanPanActivity.this.mRuleTv.setVisibility(0);
          ZhuanPanActivity.this.mTishiTextView.setVisibility(8);
        }
        while (true)
        {
          i++;
          break label163;
          break;
          label264: if (str.equals("2"))
          {
            ZhuanPanActivity.this.mDes = localGiftContentModel.getContent();
            if (ZhuanPanActivity.this.dialog != null)
              ZhuanPanActivity.this.dialog.mContentTv.setText(ZhuanPanActivity.this.mDes);
          }
        }
      }
    });
  }

  private void getLevel()
  {
    if ((this.mDataList != null) && (this.mDataList.size() > 0))
    {
      this.mGiftModel = ((GiftModel)this.mDataList.get(0));
      this.mLevel = this.mGiftModel.getLevel();
      this.mGiftId = this.mGiftModel.getGiftid();
    }
  }

  private void getWillOpenPrize()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("giftid", this.mGiftId);
    LogUtils.d("zhaugnpan", "URL:" + AppConstants.URL_BEFOREOPENGIFT);
    RequestNet.get(this, AppConstants.URL_BEFOREOPENGIFT, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("zhaugnpan", "获取失败,getWillOpenPrize-result:" + paramAnonymousException);
        ZhuanPanActivity.this.dismissLoadingDialog();
      }

      public void onResponse(String paramAnonymousString)
      {
        ZhuanPanActivity.this.dismissLoadingDialog();
        LogUtils.d("zhaugnpan", "-------getWillOpenPrize:" + paramAnonymousString);
        Gson localGson = new Gson();
        try
        {
          localBaseDataObject = (BaseDataObject)localGson.fromJson(paramAnonymousString, BaseDataObject.class);
          if (localBaseDataObject == null)
            return;
        }
        catch (Exception localException)
        {
          BaseDataObject localBaseDataObject;
          do
          {
            while (true)
            {
              localException.printStackTrace();
              localBaseDataObject = null;
            }
            if (localBaseDataObject.getFlag() == -4)
            {
              ZhuanPanActivity.activityStack.backToMain(MainActivity.class, ZhuanPanActivity.this);
              return;
            }
          }
          while (localBaseDataObject.getFlag() == 0);
          if (localBaseDataObject.getFlag() == -2)
          {
            ZhuanPanActivity.this.showDownWireDialog();
            return;
          }
          if (localBaseDataObject.getFlag() == -3)
          {
            ZhuanPanActivity.this.ShowFengjinDialog();
            return;
          }
          localBaseDataObject.getFlag();
        }
      }
    });
  }

  private void giftCallBack()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("giftid", this.mGiftId);
    LogUtils.d("zhaugnpan", "URL:" + AppConstants.URL_GIFTCALLBACK + "       " + this.mGiftId);
    RequestNet.get(this, AppConstants.URL_GIFTCALLBACK, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e("zhaugnpan", "获取失败,GetGiftCount-result:" + paramAnonymousException);
        ZhuanPanActivity.this.dialog.dismiss();
        ZhuanPanActivity.this.dialog.getmOpenImageView().clearAnimation();
        ZhuanPanActivity.this.dialog.getmOpenImageView().setEnabled(true);
        ZhuanPanActivity.this.dialog = null;
      }

      public void onResponse(String paramAnonymousString)
      {
        ZhuanPanActivity.this.dialog.dismiss();
        ZhuanPanActivity.this.dialog.getmOpenImageView().clearAnimation();
        ZhuanPanActivity.this.dialog.getmOpenImageView().setEnabled(true);
        ZhuanPanActivity.this.dialog = null;
        LogUtils.d("zhaugnpan", "-------GetGiftCount:" + paramAnonymousString);
        Gson localGson = new Gson();
        try
        {
          localGiftCallBack = (GiftCallBack)localGson.fromJson(paramAnonymousString, GiftCallBack.class);
          if (localGiftCallBack == null)
            return;
        }
        catch (Exception localException)
        {
          GiftCallBack localGiftCallBack;
          do
          {
            do
            {
              while (true)
              {
                localException.printStackTrace();
                localGiftCallBack = null;
              }
              if (localGiftCallBack.getFlag() == -4)
              {
                ZhuanPanActivity.activityStack.backToMain(MainActivity.class, ZhuanPanActivity.this);
                return;
              }
            }
            while (localGiftCallBack.getFlag() == 0);
            if (localGiftCallBack.getFlag() == -2)
            {
              ZhuanPanActivity.this.showDownWireDialog();
              return;
            }
            if (localGiftCallBack.getFlag() == -3)
            {
              ZhuanPanActivity.this.ShowFengjinDialog();
              return;
            }
          }
          while (localGiftCallBack.getFlag() != 1);
          ZhuanPanActivity.this.mStartBut.setEnabled(true);
          ZhuanPanActivity.this.playTone();
          GiftModel localGiftModel = (GiftModel)ZhuanPanActivity.this.mDataList.get(0);
          if ((ZhuanPanActivity.this.mDataList != null) && (ZhuanPanActivity.this.mDataList.size() > 0))
            ZhuanPanActivity.this.mDataList.remove(0);
          if ((ZhuanPanActivity.this.mDataList == null) || (ZhuanPanActivity.this.mDataList.size() <= 0))
          {
            ZhuanPanActivity.this.mStartBut.setEnabled(false);
            ZhuanPanActivity.this.mLevel = -1;
          }
          Intent localIntent = new Intent(ZhuanPanActivity.this, PrizeListActivity.class);
          localIntent.putExtra("data", localGiftModel);
          ZhuanPanActivity.this.startActivity(localIntent);
          ZhuanPanActivity.this.overridePendingTransition(2130968584, 2130968589);
        }
      }
    });
  }

  private void initNum(int[] paramArrayOfInt, List<Map<String, Object>> paramList)
  {
    for (int j = 0; ; j++)
    {
      if (j >= paramArrayOfInt.length)
        return;
      (j * this.mDu - this.mDu / 2);
      (j * this.mDu + this.mDu / 2);
    }
  }

  private void layEnable()
  {
    this.iv_title_left.setEnabled(this.mIsUse);
  }

  private void playTone()
  {
    try
    {
      this.mediaPlayer = MediaPlayer.create(this, 2131034112);
      this.mediaPlayer.start();
      return;
    }
    catch (Exception localException)
    {
      Log.e("DynamicImage", "playTone error:\r\n" + localException.getMessage());
    }
  }

  @SuppressLint({"NewApi"})
  private void startPropertyAnim(int paramInt)
  {
    Random localRandom = new Random();
    int j = 0;
    int k = 0;
    switch (paramInt)
    {
    default:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    }
    while (true)
    {
      int m = 5 + k * this.mDu;
      int n = -5 + (k * this.mDu + this.mDu);
      System.out.println(m + "              " + n + "              " + j);
      int i1 = m + new Random().nextInt(n) % (1 + (n - m));
      ImageView localImageView = this.mLunPanView;
      float[] arrayOfFloat = new float[2];
      arrayOfFloat[0] = 0.0F;
      arrayOfFloat[1] = (1800.0F + i1);
      ObjectAnimator localObjectAnimator = ObjectAnimator.ofFloat(localImageView, "rotation", arrayOfFloat);
      localObjectAnimator.setDuration(3000L);
      localObjectAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
      localObjectAnimator.setRepeatMode(1);
      localObjectAnimator.addListener(new Animator.AnimatorListener()
      {
        public void onAnimationCancel(Animator paramAnonymousAnimator)
        {
        }

        public void onAnimationEnd(Animator paramAnonymousAnimator)
        {
          ZhuanPanActivity.this.NormalDialogStyleTwo();
          ZhuanPanActivity.this.mStartBut.setEnabled(true);
          ZhuanPanActivity.this.mIsUse = true;
          ZhuanPanActivity.this.layEnable();
        }

        public void onAnimationRepeat(Animator paramAnonymousAnimator)
        {
        }

        public void onAnimationStart(Animator paramAnonymousAnimator)
        {
        }
      });
      localObjectAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
      {
        public void onAnimationUpdate(ValueAnimator paramAnonymousValueAnimator)
        {
          Log.d("zhangphil", ((Float)paramAnonymousValueAnimator.getAnimatedValue()).floatValue());
        }
      });
      getWillOpenPrize();
      localObjectAnimator.start();
      return;
      j = localRandom.nextInt(this.mLevel1.length);
      k = this.mLevel1[j];
      continue;
      j = localRandom.nextInt(this.mLevel2.length);
      k = this.mLevel2[j];
      continue;
      j = localRandom.nextInt(this.mLevel3.length);
      k = this.mLevel3[j];
      continue;
      j = localRandom.nextInt(this.mLevel4.length);
      k = this.mLevel4[j];
      continue;
      j = localRandom.nextInt(this.mLevel5.length);
      k = this.mLevel5[j];
    }
  }

  public void NormalDialogStyleTwo()
  {
    if (this.dialog == null)
    {
      this.dialog = new PicDialog(this);
      this.bas_in = new BounceEnter();
      this.bas_in.duration(800L);
      this.bas_out = new ZoomOutTopExit();
      this.bas_out.duration(1000L);
      this.dialog.showAnim(this.bas_in).dismissAnim(this.bas_out).show();
      this.dialog.setCanceledOnTouchOutside(false);
      this.dialog.setCancelable(false);
      this.dialog.getmOpenImageView().setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          ZhuanPanActivity.this.giftCallBack();
          ZhuanPanActivity.this.dialog.getmOpenImageView().setEnabled(false);
          ZhuanPanActivity.this.dialog.getmOpenImageView().loadAnimation(2130968592, new AnimationImageView.OnFrameAnimationListener()
          {
            public void onEnd()
            {
            }

            public void onStart()
            {
            }
          });
        }
      });
      String str3;
      label234: String str1;
      label300: String str2;
      if (CustomApplication.app.userBaseBean != null)
      {
        str3 = CustomApplication.app.userBaseBean.getNick_name();
        CustomApplication.app.userBaseBean.getSignature();
        if ((str3 == null) || ("".equals(str3)))
        {
          this.dialog.mNameTv.setText("暂无昵称");
          String str4 = CustomApplication.app.userBaseBean.getUser_logo();
          if ((str4 == null) || ("".equals(str4)))
            break label392;
          UiUtil.loadImage(AppConstants.BASE_URL_IMG + str4, this, this.dialog.mHeadImageView);
        }
      }
      else
      {
        GiftModel localGiftModel = (GiftModel)this.mDataList.get(0);
        int j = localGiftModel.getType();
        int k = localGiftModel.getLevel();
        str1 = "一";
        switch (k)
        {
        default:
          this.dialog.mStarTv.setText(str1 + "星红包，金额随机");
          str2 = "";
          switch (j)
          {
          default:
          case 2:
          case 0:
          case 1:
          }
          break;
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        }
      }
      while (true)
      {
        this.dialog.mContentTv.setText(str2);
        return;
        this.dialog.mNameTv.setText(str3);
        break;
        label392: this.dialog.mHeadImageView.setImageResource(2130838020);
        break label234;
        str1 = "一";
        break label300;
        str1 = "二";
        break label300;
        str1 = "三";
        break label300;
        str1 = "四";
        break label300;
        str1 = "五";
        break label300;
        str2 = "未拆开的红包";
        continue;
        str2 = this.mDes;
      }
    }
    this.dialog.getmOpenImageView().clearAnimation();
    this.dialog.show();
  }

  public void endLunPan()
  {
    stopRotation();
    this.mHandler.post(new Runnable()
    {
      public void run()
      {
        ZhuanPanActivity.this.NormalDialogStyleTwo();
      }
    });
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903098);
    setTitle(8, 0, 2130837809, "大转盘", 0, 8, 8, 0, true);
    this.mStartBut = ((ImageView)findViewById(2131100021));
    this.mRightTv = ((ImageView)findViewById(2131100017));
    this.mRightTv.setOnClickListener(this.onClickListener);
    this.mLunPanView = ((ImageView)findViewById(2131100020));
    this.mTopImageView = ((ImageView)findViewById(2131100018));
    this.mYuanPanLayout = ((RelativeLayout)findViewById(2131100019));
    this.mRuleTv = ((TextView)findViewById(2131100022));
    this.mTishiTextView = ((TextView)findViewById(2131100023));
    this.mRuleTv.setVisibility(8);
    this.mTishiTextView.setVisibility(0);
    Bitmap localBitmap = BitmapFactory.decodeResource(getResources(), 2130837583);
    int j = localBitmap.getWidth();
    int k = localBitmap.getHeight() * getResources().getDisplayMetrics().widthPixels / j;
    ViewGroup.LayoutParams localLayoutParams = this.mTopImageView.getLayoutParams();
    localLayoutParams.height = k;
    this.mTopImageView.setLayoutParams(localLayoutParams);
    new DisplayMetrics();
    DisplayMetrics localDisplayMetrics = getResources().getDisplayMetrics();
    RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(6 * localDisplayMetrics.widthPixels / 7, 6 * localDisplayMetrics.widthPixels / 7);
    localLayoutParams1.addRule(13);
    this.mLunPanView.setLayoutParams(localLayoutParams1);
    this.mCount = (this.mLevel1.length + this.mLevel2.length + this.mLevel3.length + this.mLevel4.length + this.mLevel5.length);
    this.mDu = (360 / this.mCount);
    this.mStartBut.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ZhuanPanActivity.this.mStartBut.setEnabled(false);
        ZhuanPanActivity.this.mIsUse = false;
        ZhuanPanActivity.this.layEnable();
        if ((ZhuanPanActivity.this.mDataList != null) && (ZhuanPanActivity.this.mDataList.size() > 0))
        {
          if (((GiftModel)ZhuanPanActivity.this.mDataList.get(0)).getType() == 2)
          {
            ZhuanPanActivity.this.getLevel();
            ZhuanPanActivity.this.NormalDialogStyleTwo();
            ZhuanPanActivity.this.mIsUse = true;
            ZhuanPanActivity.this.layEnable();
          }
        }
        else
          return;
        ZhuanPanActivity.this.mStartBut.setEnabled(false);
        ZhuanPanActivity.this.getLevel();
        if (ZhuanPanActivity.this.mLevel > 0)
        {
          ZhuanPanActivity.this.startPropertyAnim(ZhuanPanActivity.this.mLevel);
          return;
        }
        ZhuanPanActivity.this.mStartBut.setEnabled(false);
        ZhuanPanActivity.this.mIsUse = true;
        ZhuanPanActivity.this.layEnable();
      }
    });
    this.mStartBut.setEnabled(false);
    getGiftContent();
  }

  protected void onDestroy()
  {
    super.onDestroy();
  }

  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    if (paramInt == 4)
    {
      System.out.println("按下了back键   onKeyDown()" + this.mIsUse);
      if (this.mIsUse)
        finish();
      return false;
    }
    return super.onKeyDown(paramInt, paramKeyEvent);
  }

  protected void onPause()
  {
    super.onPause();
  }

  protected void onResume()
  {
    super.onResume();
  }

  protected void onStop()
  {
    super.onStop();
  }

  public void rotateAnim(int paramInt)
  {
    Random localRandom = new Random();
    int j = 0;
    int k = 0;
    switch (paramInt)
    {
    default:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    }
    while (true)
    {
      int m = 5 + (k * this.mDu - this.mDu / 2);
      int n = -5 + (k * this.mDu + this.mDu / 2);
      System.out.println(m + "              " + n + "              " + j);
      this.anim = new RotateAnimation(0.0F, 1440.0F + (m + new Random().nextInt(n) % (1 + (n - m))), 1, 0.5F, 1, 0.5F);
      this.anim.setFillAfter(true);
      this.anim.setDuration(3000L);
      this.anim.setInterpolator(new AccelerateDecelerateInterpolator());
      this.anim.setFillBefore(true);
      this.anim.setFillEnabled(true);
      this.anim.setFillAfter(true);
      this.mLunPanView.startAnimation(this.anim);
      this.anim.setAnimationListener(new Animation.AnimationListener()
      {
        public void onAnimationEnd(Animation paramAnonymousAnimation)
        {
          ZhuanPanActivity.this.NormalDialogStyleTwo();
          ZhuanPanActivity.this.mStartBut.setEnabled(true);
        }

        public void onAnimationRepeat(Animation paramAnonymousAnimation)
        {
        }

        public void onAnimationStart(Animation paramAnonymousAnimation)
        {
        }
      });
      return;
      j = localRandom.nextInt(this.mLevel1.length);
      k = this.mLevel1[j];
      continue;
      j = localRandom.nextInt(this.mLevel2.length);
      k = this.mLevel2[j];
      continue;
      j = localRandom.nextInt(this.mLevel3.length);
      k = this.mLevel3[j];
      continue;
      j = localRandom.nextInt(this.mLevel4.length);
      k = this.mLevel4[j];
      continue;
      j = localRandom.nextInt(this.mLevel5.length);
      k = this.mLevel5[j];
    }
  }

  @SuppressLint({"NewApi"})
  public void setTitle(int paramInt1, int paramInt2, int paramInt3, String paramString, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean)
  {
    ((TextView)findViewById(2131099701)).setText(paramString);
    ((TextView)findViewById(2131099700)).setVisibility(paramInt1);
    this.iv_title_left = ((ImageView)findViewById(2131099699));
    this.iv_title_left.setVisibility(paramInt2);
    this.iv_title_left.setOnClickListener(this.onClickListener);
    this.iv_title_left.setImageResource(paramInt3);
    ((TextView)findViewById(2131099702)).setVisibility(paramInt5);
    ((ImageView)findViewById(2131099703)).setVisibility(8);
    this.iv_title_right = ((ImageView)findViewById(2131099704));
    this.iv_title_right.setVisibility(paramInt6);
    this.iv_title_right.setImageResource(paramInt7);
  }

  public void stopAnim()
  {
    if (this.mediaPlayer != null)
    {
      if (this.mediaPlayer.isPlaying())
        this.mediaPlayer.stop();
      this.mediaPlayer.release();
      this.mediaPlayer = null;
    }
  }

  public void stopRotation()
  {
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.zhuanpan.ZhuanPanActivity
 * JD-Core Version:    0.6.2
 */